package com.zhm.demo.feign;

import com.zhm.base.TestReq;
import feign.Headers;
import feign.RequestLine;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 设备运行数据client
 */
@FeignClient(name = "data", contextId = "demo")
public interface DataFeignClient {

    @RequestLine("POST /data/test")
    @Headers("Content-Type: application/json")
    @PostMapping(path = "/data/test")
    String add(@RequestBody TestReq req);


}
